CC = g++
LD = g++
prog = ml_empty.dll
SRC = \
      album.cpp \
      album.h \
      gen_empty.cpp \
      gen_empty.h \
      interpreter.cpp \
      interpreter.h \
      message.h \
      play_message.h \
      queue.cpp \
      queue.h \
      queue_worker.h \
      queue_worker.cpp \
      receiver_thread.cpp \
      receiver_thread.h \
      title.cpp \
      title.h \
      wa502_sdk/gen_ml/ml_lib.cpp \
      worker_thread.h 
OBJ = \
      album.o \
      gen_empty.o \
      interpreter.o \
      queue.o \
      receiver_thread.o \
      queue_worker.o \
      wa502_sdk/gen_ml/ml_lib.o \
      title.o 

LDFLAGS = -shared -Wl,--out-implib,libml_empty.a,--output-def,ml_empty.def \
	  -LC:\\Boost\\lib -lboost_thread-gcc-mt-1_33_1 -lwsock32 -lws2_32 \
	  -L./socket -lsocket_cpp -LC:\\Expat-2.0.0\\Libs -lexpat 
CFLAGS = -DBUILD_DLL -D_WIN32_IE=0x0700 -IC:\\Boost\\include\\boost-1_33_1 \
	 -IC:\\Expat-2.0.0\\Source\\lib

all: $(prog)

${prog}: $(OBJ)
	$(LD) $(OBJ) -o $(prog) $(LDFLAGS)

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

install:
	cp $(prog) /cygdrive/c/Programme/Winamp/Plugins

clean:
	rm $(OBJ)
	rm $(prog)

run:
	./$(prog)
